#!/bin/sh
set -o nounset
#set -x #DEBUG

. bin/library.sh

ISOLINUX_DIR=$ISOMNT_RW/isolinux

require_rootfs_rw_mounted

# This should never be needed, but...
[ -d $ISOLINUX_DIR ] || {
    printinfo Creating target isolinux directory...
    $SUDO mkdir -p $ISOLINUX_DIR
}

[ $ISOLINUX_DIR/txt.cfg -nt custom/isofs/casper/txt.cfg ] || {
    printinfo Installing custom isolinux menu configuration...
    $SUDO install -g root -o root -m 664 \
        custom/isofs/casper/txt.cfg \
        $ISOLINUX_DIR

    # Indicate ISO RW filesystem modified
    touch stamps/isofs.stamp
}

exit 0
